﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/AdminMP.master" AutoEventWireup="true" CodeFile="ManagerFoods.aspx.cs" Inherits="admin_MangerFoods" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style9
        {
            width: 158px;
        }
        .style10
        {
            width: 158px;
            height: 4px;
        }
        .style12
        {
            width: 158px;
            height: 303px;
        }
        .style14
        {
        }
        .style15
        {
            width: 21px;
        }
        .style17
        {
            width: 38px;
        }
        .style18
        {
            width: 68px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table style="width: 100%; height: 434px;">
        <tr>
            <td class="style10">
            </td>
            <td class="style14" rowspan="3" style="vertical-align: top; text-align: left">
                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" CellPadding="4" 
                    ForeColor="#333333" GridLines="None" AutoGenerateColumns="False" 
                    AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" 
                    DataKeyNames="foodID" Height="266px" 
                    onpageindexchanging="GridView1_PageIndexChanging" 
                    onrowcancelingedit="GridView1_RowCancelingEdit" 
                    onrowcommand="GridView1_RowCommand" onrowdeleting="GridView1_RowDeleting" 
                    onrowediting="GridView1_RowEditing" onrowupdating="GridView1_RowUpdating" 
                    Width="739px">
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    <Columns>
                        <asp:ButtonField CommandName="Add" Text="新增" />
                        <asp:ImageField DataImageUrlField="foodImgUrl" ReadOnly="True">
                            <ControlStyle Height="50px" Width="50px" />
                        </asp:ImageField>
                        <asp:TemplateField HeaderText="商品ID">
                            <EditItemTemplate>
                                &nbsp;
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("foodID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="商品类型ID">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox2" runat="server" Text='<%# Eval("foodClassID") %>'></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                    ControlToValidate="TextBox2" ErrorMessage="*商品类有不能为空" ForeColor="Red"></asp:RequiredFieldValidator>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Eval("foodClassID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="商品名称">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox3" runat="server" Text='<%# Eval("foodName") %>'></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                    ControlToValidate="TextBox3" ErrorMessage="*商品名称不能为空" ForeColor="Red"></asp:RequiredFieldValidator>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label3" runat="server" Text='<%# Eval("foodName") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="商品价格">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox4" runat="server" 
                                    Text='<%# Convert.ToDouble(Eval("foodPrice")) %>'></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                                    ControlToValidate="TextBox4" Display="Dynamic" ErrorMessage="*商品价格不能为空" 
                                    ForeColor="Red"></asp:RequiredFieldValidator>
                                &nbsp;<asp:RangeValidator ID="RangeValidator1" runat="server" 
                                    ControlToValidate="TextBox4" Display="Dynamic" ErrorMessage="*价格必须&gt;0" 
                                    ForeColor="Red" MaximumValue="20000000" MinimumValue="0" Type="Double"></asp:RangeValidator>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label4" runat="server" Text='<%# Eval("foodPrice") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="销量">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox5" runat="server" 
                                    Text='<%# Convert.ToInt32(Eval("foodSaleNum")) %>'></asp:TextBox>
                                &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                                    ControlToValidate="TextBox5" Display="Dynamic" ErrorMessage="*销量至少是0" 
                                    ForeColor="Red"></asp:RequiredFieldValidator>
                                &nbsp;<asp:RangeValidator ID="RangeValidator2" runat="server" 
                                    ControlToValidate="TextBox5" Display="Dynamic" ErrorMessage="*销量不能为负数" 
                                    ForeColor="Red" MaximumValue="1000000" MinimumValue="0" Type="Integer"></asp:RangeValidator>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label5" runat="server" Text='<%# Eval("foodSaleNum") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="图片路径">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox6" runat="server" Text='<%# Eval("foodImgUrl") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label6" runat="server" Text='<%# Eval("foodImgUrl") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <EditRowStyle BackColor="#999999" />
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <SortedAscendingCellStyle BackColor="#E9E7E2" />
                    <SortedAscendingHeaderStyle BackColor="#506C8C" />
                    <SortedDescendingCellStyle BackColor="#FFFDF8" />
                    <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td class="style12" style="vertical-align: top">
                <table style="width: 97%; height: 150px;">
                    <tr>
                        <td class="style15">
                            &nbsp;</td>
                        <td class="style18">
                            <asp:LinkButton ID="LBtnUserManager" runat="server" Font-Bold="True" 
                                Font-Size="Small" onclick="LBtnUserManager_Click">用户管理</asp:LinkButton>
                        </td>
                        <td class="style17">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style15">
                            &nbsp;</td>
                        <td class="style18">
                            <asp:LinkButton ID="LBtnFoodManager" runat="server" Font-Bold="True" 
                                Font-Size="Small" onclick="LBtnFoodManager_Click">菜品管理</asp:LinkButton>
                        </td>
                        <td class="style17">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style15">
                            &nbsp;</td>
                        <td class="style18">
                            <asp:LinkButton ID="LinkButton3" runat="server" Font-Bold="True" 
                                Font-Size="Small" onclick="LinkButton3_Click">订单管理</asp:LinkButton>
                        </td>
                        <td class="style17">
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style15">
                            &nbsp;</td>
                        <td class="style18">
                            <asp:LinkButton ID="LinkButton4" runat="server" Font-Bold="True" 
                                Font-Size="Small" onclick="LinkButton4_Click">销售统计</asp:LinkButton>
                        </td>
                        <td class="style17">
                            &nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td class="style9">
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>

